<template>
  <div class="card">
    <el-card :shadow="props.shadow">
      <template v-if="props.title" #header>
        <HyTitle :title="title" />
      </template>
      <slot name="default"></slot>
    </el-card>
  </div>
</template>

<script lang="ts" setup>
import HyTitle from '/@/components/HyTitle/index.vue';
const props = defineProps({
  shadow: {
    type: String,
    default: 'hover',
  },
  title: {
    type: String,
    default: '',
  },
});
</script>
<style scoped lang="scss">
.card {
  :deep(.el-card__header) {
    padding: 20px;
  }
  :deep(.el-card__body) {
    padding: 0;
  }
}
</style>
